
import request from '@shared/apis/request';
import * as apis from '@shared/apis';

export interface IParams {
    /** 页码 */
    page: number;
    /** 每页数量 */
    pageSize: number;
    /** 搜索关键词 */
    keyword?: string;
}

/**
 * 获取用户列表
 */
export async function post(params: IParams) {
    const url = '/customers/list';
    const body = await request.post<IDate>(url, params);
    return body.data;
}

export interface IDate {
    items: apis.customers.ICustomer[];
    pagination: { total: number };
}